<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let province=prompt("请输入您的省份");
    function f(province){
        if(province == "北京市"){
            return "京";
        }else if(province == "天津市"){
            return "津";
        }else if(province == "重庆市"){
            return "渝";
        }else if(province == "上海市"){
            return "沪";
        }else if(province == "河北省"){
            return "冀";
        }else if(province == "山西省"){
            return "晋";
        }else if(province == "辽宁省"){
            return "辽";
        }else if(province == "吉林省"){
            return "吉";
        } else if(province == "黑龙江省"){
            return "黑";
        }else if(province == "江苏省"){
            return "苏";
        }else if(province == "浙江省"){
            return "浙";
        }else if(province == "安徽省"){
            return "皖";
        }else if(province == "福建省"){
            return "闽";
        } else if(province == "江西省"){
            return "赣";
        } else if(province == "山东省"){
            return "鲁";
        } else if(province == "河南省"){
            return "豫";
        } else if(province == "湖北省"){
            return "鄂";
        } else if(province == "湖南省"){
            return "湘";
        } else if(province == "广东省"){
            return "粤";
        } else if(province == "海南省"){
            return "琼";
        } else if(province == "四川省"){
            return "川/蜀";
        } else if(province == "贵州省"){
            return "黔/贵";
        } else if(province == "云南省"){
            return "云/滇";
        } else if(province == "陕西省"){
            return "陕/秦";
        } else if(province == "甘肃省"){
            return "甘/陇";
        } else if(province == "青海省"){
            return "青";
        } else if(province == "台湾省"){
            return "台";
        } else if(province == "内蒙古自治区"){
            return "内蒙古";
        } else if(province == "广西壮族自治区"){
            return "桂";
        } else if(province == "宁夏回族自治区"){
            return "宁";
        } else if(province == "新疆维吾尔自治区 "){
            return "新";
        } else if(province == "西藏自治区"){
            return "藏";
        } else if(province == "香港特别行政区"){
            return "港";
        } else if(province == "澳门特别行政区"){
            return "澳";
        }else{
            return "您输入有误！！!"
        }
        return province;
    }
    document.write(f(province));


</script>
</body>
</html>